package adv5;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Scanner;

public class FathersDay {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		System.out.println("请输入年份：");
		int year = input.nextInt();
		Calendar c = Calendar.getInstance();
		c.set(year, Calendar.JUNE, 1);

		c.set(Calendar.MONTH, Calendar.JUNE);
		System.out.println(c.getTime());
		c.add(Calendar.DAY_OF_MONTH, 14);// 每月星期天的第三个星期

		SimpleDateFormat it = new SimpleDateFormat();
		it.applyPattern("yyyy年MM月dd日");
		System.out.println(year + "年的父亲节为：" + (it.format(c.getTime())));

	}
}
